/*
 * @Description: babel 配置
 * @Date: 2021-05-28 02:02:18 +0800
 * @Author: JackChou
 * @LastEditTime: 2021-05-28 03:11:39 +0800
 * @LastEditors: JackChou
 */
module.exports = function(api) {
  api.cache(true)

  const presets = ['@babel/preset-env']
  const plugins = [
    '@babel/plugin-proposal-class-properties',
    '@babel/plugin-proposal-optional-chaining',
    '@babel/plugin-proposal-nullish-coalescing-operator',
    'transform-vue-jsx',
  ]

  return {
    presets,
    plugins,
  }
}
